

package jetbrains.buildServer.server.rest;

import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @see jetbrains.buildServer.server.rest.RESTControllerExtension
 * @author Yegor.Yarko
 *         Date: 03.08.2010
 */
public abstract class RESTControllerExtensionAdapter implements RESTControllerExtension{
  @NotNull
  private ConfigurableApplicationContext myContext;

  @NotNull
  public abstract String getPackage();

  @NotNull
  public ConfigurableApplicationContext getContext() {
    return myContext;
  }

  /**
   * Do not invoke!
   * It's autowired by Spring.
   */
  @Autowired
  public void setContext(@NotNull ConfigurableApplicationContext myContext) {
    this.myContext = myContext;
  }
}